package com.liuwei.msmall.common.enums;

/**
 * @Classname BizeEnum
 * @Date 2021/4/10 2:57 下午
 * @Created by llww
 */
public enum BizeEnum {
    VALIDATE_EXCEPTION(10000,"参数校验失败"),
    TOO_MANY_REQUEST(10008,"请求数量太多。。。"),
    UNKNOWN_EXCEPTION(10010,"系统未知错误"),
    PRODUCT_UP_EXCEPTION(11001,"sku保存到es失败"),
    PRODUCT_DOWN_EXCEPTION(11002,"spu从es下架失败"),
    SMS_CODE_EXCEPTION(10002,"短信验证码频率过高,请60s后再次获取"),
    USERNAME_EXIST_EXCEPTION(12001,"用户名已存在"),
    PHONE_EXIST_EXCEPTION(12002,"手机号码已存在"),
    NO_STOCK_EXCEPTION(13001,"库存不足"),
    PRODUCT_NULL_EXCEPTION(13002,"锁定库存的商品为空"),
    LOGIN_ERROR_EXCEPTION(12003,"账号或密码错误");

    private Integer code;
    private String msg;


    BizeEnum(Integer code,String msg){

        this.code=code;
        this.msg=msg;

    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
